Repository navigation
fix(id): reject an empty module_hash in world manifests (#1517) - #1527
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 13 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Fixes #1517
WorldManifest::validateclaimed a module hash "must be 1 to 64 hex digits" but only checked the upper bound and hex digits — an emptymodule_hash = ""parsed cleanly, andplan()/apply()would install the empty hash. Every sibling validator inworld_caps.rspairs its length cap with!is_empty(); this one was the outlier.!hash.is_empty()to the hash check inpkgs/id/src/world_manifest.rsvalidation_rejects_unknown_names_and_bad_hashes:module_hash = ""is rejectedVerified: probe crate compiling the verbatim file — before:
parse("module_hash = \"\"")OK; after: Err("module hash must be 1 to 64 hex digits"), controls (abc123OK,not-hex!Err) unchanged;cargo test --lib world_manifeston the laptop; rustfmt clean.Need help on this PR? Tag
@codesmith-botwith what you need.